class Student{
    public String name;//姓名
    public int age;    //年龄
    public double height;//身高
    public double weight;//体重
    public Student(String name, int age, double height, double weight) {
        this.name = name;
        this.age = age;
        this.height = height;
        this.weight = weight;
        System.out.println("构造方法被调用了");
    }

    public void print(){
        System.out.println(name+" "+"年龄："+age+"身高："+"体重："+weight);
    }
    //行为
    public void eat() {
        System.out.println(name+"正在吃饭！");
    }
    public void sleep() {
        System.out.println(name+"又在睡觉！");
    }
    public void game() {
        System.out.println(name+"居然还在玩游戏！");
    }
}
public class Myclass {
    public static void main(String[] args) {
        Student stu = new Student("张三",20,176.5,135);
        stu.print();
        System.out.println("==========");
        Student stu1 = new Student("李三",15,170.5,115);
        stu.print();
    }
    /**public static void main2(String[] args) {
        //实例化第二个学生
        Student student1 = new Student();
        student1.name = "小茗同学";
        student1.age = 18;
        student1.eat();
        student1.sleep();
        student1.game();
        System.out.println("===========");
        //实例化第二个学生对象
        Student student2 = new Student();
        student2.name = "喜洋洋";
        student2.age = 13;
        student2.eat();
        student2.sleep();
        student2.game();

    }**/
}
